package edu.spec.wechat.quartz;

import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.scheduling.quartz.QuartzJobBean;

/**
 * Created by Administrator on 2016/10/16.
 */
public class RefreshAccessTokenJob extends QuartzJobBean{

    private RefreshAccessTokenTask task;

    public void setTask(RefreshAccessTokenTask task) {
        this.task = task;
    }

    @Override
    protected void executeInternal(JobExecutionContext jobExecutionContext) throws JobExecutionException {
        task.refreshToken();
    }
}
